//
//  AY_RefreshHeader.m
//  AiYue
//
//  Created by mac on 2023/12/5.
//

#import "AY_RefreshHeader.h"

@implementation AY_RefreshHeader

- (void)prepare
{
    [super prepare];
    //1. 设置普通状态的动画图片
    NSMutableArray *idleImages = [NSMutableArray array];
    NSInteger count = 50;
    
    for (NSUInteger i = 0; i< count; i++) {
        UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"xl_%zd", i]];
        if (image) {
            [idleImages addObject:image];
        }

    }
   
    [self setImages:idleImages forState:MJRefreshStateIdle];
   
    //3. 设置正在刷新状态的动画图片
    [self setImages:idleImages forState:MJRefreshStateRefreshing];
//        //2. 设置即将刷新状态的动画图片（一松开就会刷新的状态）
    [self setImages:idleImages forState:MJRefreshStatePulling];
}

@end
